package com.example.demo.controller;

import com.example.demo.config.UrlProperties;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author mdl
 * @date 2020/4/3 13:17
 */
@Controller
@Slf4j
public class ExampleController {

    @Autowired
    private UrlProperties urlProperties;

    @RequestMapping(value ="/hello", method = RequestMethod.GET)
    @ResponseBody
    public String home(){
        return "你好，Spring Boot";
    }

    @RequestMapping(value ="/url/orderList", method = RequestMethod.GET)
    @ResponseBody
    public String orderListUrl(){
        return urlProperties.getOrderList();
    }

}
